package cn.skyquant.quant4j.service.boot.web.context;

import cn.skyquant.quant4j.api.authority.UserDTO;
import org.springframework.stereotype.Component;

@Component
public class WebContext {

    private ThreadLocal<UserDTO> userLocal = new ThreadLocal<>();

    public UserDTO get() {
        return userLocal.get();
    }

    public void set(UserDTO userDTO){
        userLocal.set(userDTO);
    }
}
